const crypto = require('crypto');
const obj = {
    key : 'dasfghjklzxcvbnm',
    iv :'zxcvbnmasdfghjkl'
}
function encrypt(data, key, iv) {
    let cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
    return cipher.update(data, 'utf8', 'hex') + cipher.final('hex');
  }
function decrypt(crypted, key, iv) {
    let decipher = crypto.createDecipheriv('aes-128-cbc', key, iv);
    return decipher.update(crypted, 'hex', 'utf8') + decipher.final('utf8');
  }
module.exports = {
    obj,
    encrypt,
    decrypt
}